package com.liefox.serviceedu.controller;

import com.liefox.commonutils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zjh
 * @Date 2021/7/12 下午 8:20
 **/
@Api(description = "后台登录")
@RestController
@RequestMapping("/serviceedu/user")
//@CrossOrigin
public class EduLoginController {

    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    @ApiOperation(value = "获取用户信息")
    @GetMapping("info")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "http://edu-zjh.oss-cn-beijing.aliyuncs.com/2021/07/13/14e9a5f380f949b1895bb5b0a57b4921file.png");
    }
}
